<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        ul {
            list-style: none;
        }
        
        li {
            width: 100px;
            height: 30px;
            line-height: 30px;
            text-align: center;
            border: 1px solid #333;
        }
        
        li:nth-of-type(even) {
            background-color: #eee;
        }
        
        li:nth-of-type(odd) {
            background-color: yellow;
        }
        
        li:hover {
            background-color: red;
        }
    </style>
</head>

<body>
    <ul id='box'>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
        <li>7</li>
        <li>8</li>
        <li>9</li>
        <li>10</li>
    </ul>
    <input type="button" value="点击">
</body>

</html>
<script>
    var box = document.getElementById('box');
    // console.log(box);
</script>